// source --> https://4dresult2u.com/wp-content/plugins/jetpack/modules/related-posts/related-posts.js?ver=20150408 /* jshint onevar: false */ /* globals related_posts_js_options */ /** * Load related posts */ (function($) { var jprp = { response: null, /** * Utility get related posts JSON endpoint from URLs * * @param string URL (optional) * @return string endpoint URL */ getEndpointURL: function( URL ) { var locationObject = document.location; if ( 'string' === typeof( URL ) && URL.match( /^https?:\/\// ) ) { locationObject = document.createElement( 'a' ); locationObject.href = URL; } var args = 'relatedposts=1'; if ( $( '#jp-relatedposts' ).data( 'exclude' ) ) { args += '&relatedposts_exclude=' + $( '#jp-relatedposts' ).data( 'exclude' ); } var pathname = locationObject.pathname; if ( '/' !== pathname[0] ) { pathname = '/' + pathname; } if ( '' === locationObject.search ) { return pathname + '?' + args; } else { return pathname + locationObject.search + '&' + args; } }, getAnchor: function( post, classNames ) { var anchor_title = post.title; if ( '' !== ( '' + post.excerpt ) ) { anchor_title += '\n\n' + post.excerpt; } var anchor = $( '' ); anchor.attr({ 'class': classNames, 'href': post.url, 'title': anchor_title, 'rel': post.rel, 'data-origin': post.url_meta.origin, 'data-position': post.url_meta.position }); var anchor_html = $( '
' ).append( anchor ).html(); return [ anchor_html.substring( 0, anchor_html.length-4 ), '' ]; }, generateMinimalHtml: function( posts ) { var self = this; var html = ''; $.each( posts, function( index, post ) { var anchor = self.getAnchor( post, 'jp-relatedposts-post-a' ); var classes = 'jp-relatedposts-post jp-relatedposts-post' + index; if ( post.classes.length > 0 ) { classes += ' ' + post.classes.join( ' ' ); } html += '

'; html += ''; html += ''; html += ''; html += '

'; } ); return ''; }, generateVisualHtml: function( posts ) { var self = this; var html = ''; $.each( posts, function( index, post ) { var anchor = self.getAnchor( post, 'jp-relatedposts-post-a' ); var classes = 'jp-relatedposts-post jp-relatedposts-post' + index; if ( post.classes.length > 0 ) { classes += ' ' + post.classes.join( ' ' ); } if ( ! post.img.src ) { classes += ' jp-relatedposts-post-nothumbs'; } else { classes += ' jp-relatedposts-post-thumbs'; } html += '
'; if ( post.img.src ) { html += anchor[0] + '' + anchor[1]; } else { var anchor_overlay = self.getAnchor( post, 'jp-relatedposts-post-a jp-relatedposts-post-aoverlay' ); html += anchor_overlay[0] + anchor_overlay[1]; } html += '<' + related_posts_js_options.post_heading + ' class="jp-relatedposts-post-title">' + anchor[0] + post.title + anchor[1] + ''; html += '

' ).text( post.excerpt ).html() + '

'; html += ''; html += ''; html += '
'; } ); return ''; }, /** * We want to set a max height on the excerpt however we want to set * this according to the natual pacing of the page as we never want to * cut off a line of text in the middle so we need to do some detective * work. */ setVisualExcerptHeights: function() { var elements = $( '#jp-relatedposts .jp-relatedposts-post-nothumbs .jp-relatedposts-post-excerpt' ); if ( 0 >= elements.length ) { return; } var fontSize = parseInt( elements.first().css( 'font-size' ), 10 ), lineHeight = parseInt( elements.first().css( 'line-height' ), 10 ); // Show 5 lines of text elements.css( 'max-height', ( 5 * lineHeight / fontSize ) + 'em' ); }, getTrackedUrl: function( anchor ) { var args = 'relatedposts_hit=1'; args += '&relatedposts_origin=' + $( anchor ).data( 'origin' ); args += '&relatedposts_position=' + $( anchor ).data( 'position' ); var pathname = anchor.pathname; if ( '/' !== pathname[0] ) { pathname = '/' + pathname; } if ( '' === anchor.search ) { return pathname + '?' + args; } else { return pathname + anchor.search + '&' + args; } }, cleanupTrackedUrl: function() { if ( 'function' !== typeof history.replaceState ) { return; } var cleaned_search = document.location.search.replace( /\brelatedposts_[a-z]+=[0-9]*&?\b/gi, '' ); if ( '?' === cleaned_search ) { cleaned_search = ''; } if ( document.location.search !== cleaned_search ) { history.replaceState( {}, document.title, document.location.pathname + cleaned_search ); } } }; $( function() { jprp.cleanupTrackedUrl(); $.getJSON( jprp.getEndpointURL(), function( response ) { if ( 0 === response.items.length || 0 === $( '#jp-relatedposts' ).length ) { return; } jprp.response = response; var html = ''; if ( !response.show_thumbnails ) { html = jprp.generateMinimalHtml( response.items ); } else { html = jprp.generateVisualHtml( response.items ); } $( '#jp-relatedposts' ).append( html ); jprp.setVisualExcerptHeights(); $( '#jp-relatedposts' ).show(); $( '#jp-relatedposts a.jp-relatedposts-post-a' ).click(function() { this.href = jprp.getTrackedUrl( this ); }); } ); } ); })(jQuery); // source --> https://4dresult2u.com/wp-content/plugins/add-to-any/addtoany.min.js?ver=1.0 "function"==typeof jQuery&&jQuery(document).ready(function(a){a("body").on("post-load",function(){window.a2a&&a2a.init_all("page")})}); // source --> https://4dresult2u.com/wp-content/themes/enfold/js/avia-compat.js?ver=2 /* this prevents dom flickering for elements hidden with js, needs to be outside of dom.ready event.also adds several extra classes for better browser support this is a separate file that needs to be loaded at the top of the page. other js functions are loaded before the closing body tag to make the site render faster */ "use strict" var avia_is_mobile = false; if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && 'ontouchstart' in document.documentElement) { avia_is_mobile = true; document.documentElement.className += ' avia_mobile '; } else { document.documentElement.className += ' avia_desktop '; } document.documentElement.className += ' js_active '; (function(){ //set transform property var prefix = ['-webkit-','-moz-', '-ms-', ""], transform = ""; for (var i in prefix) { // http://artsy.github.io/blog/2012/10/18/so-you-want-to-do-a-css3-3d-transform/ if(prefix[i]+'transform' in document.documentElement.style) { document.documentElement.className += " avia_transform "; transform = prefix[i]+'transform'} if(prefix[i]+'perspective' in document.documentElement.style) document.documentElement.className += " avia_transform3d "; } //set parallax position to prevent jump at pageload if(typeof document.getElementsByClassName == 'function' && typeof document.documentElement.getBoundingClientRect == "function" && avia_is_mobile == false) { if(transform && window.innerHeight > 0) { setTimeout(function(){ var y = 0, offsets = {}, transY = 0, parallax = document.getElementsByClassName("av-parallax"), winTop = window.pageYOffset || document.documentElement.scrollTop; for (y = 0; y < parallax.length; y++) { parallax[y].style.top = "0px"; offsets = parallax[y].getBoundingClientRect(); transY = Math.ceil( (window.innerHeight + winTop - offsets.top) * 0.3 ); parallax[y].style[transform] = "translate(0px, "+transY+"px)"; parallax[y].style.top = "auto"; parallax[y].className += ' enabled-parallax '; } }, 50); } } })(); // source --> https://4dresult2u.com/wp-content/plugins/wp-shortcode/js/jquery.tipsy.js?ver=4.7.28 // tipsy, facebook style tooltips for jquery // version 1.0.0a // (c) 2008-2010 jason frame [jason@onehackoranother.com] // released under the MIT license (function($) { function maybeCall(thing, ctx) { return (typeof thing == 'function') ? (thing.call(ctx)) : thing; }; function isElementInDOM(ele) { while (ele = ele.parentNode) { if (ele == document) return true; } return false; }; function Tipsy(element, options) { this.$element = $(element); this.options = options; this.enabled = true; this.fixTitle(); }; Tipsy.prototype = { show: function() { var title = this.getTitle(); if (title && this.enabled) { var $tip = this.tip(); $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).prependTo(document.body); var pos = $.extend({}, this.$element.offset(), { width: this.$element[0].offsetWidth, height: this.$element[0].offsetHeight }); var actualWidth = $tip[0].offsetWidth, actualHeight = $tip[0].offsetHeight, gravity = maybeCall(this.options.gravity, this.$element[0]); var tp; switch (gravity.charAt(0)) { case 'n': tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; break; case 's': tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; break; case 'e': tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; break; case 'w': tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}; break; } if (gravity.length == 2) { if (gravity.charAt(1) == 'w') { tp.left = pos.left + pos.width / 2 - 15; } else { tp.left = pos.left + pos.width / 2 - actualWidth + 15; } } $tip.css(tp).addClass('tipsy-' + gravity); $tip.find('.tipsy-arrow')[0].className = 'tipsy-arrow tipsy-arrow-' + gravity.charAt(0); if (this.options.className) { $tip.addClass(maybeCall(this.options.className, this.$element[0])); } if (this.options.fade) { $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}); } else { $tip.css({visibility: 'visible', opacity: this.options.opacity}); } } }, hide: function() { if (this.options.fade) { this.tip().stop().fadeOut(function() { $(this).remove(); }); } else { this.tip().remove(); } }, fixTitle: function() { var $e = this.$element; if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') { $e.attr('original-title', $e.attr('title') || '').removeAttr('title'); } }, getTitle: function() { var title, $e = this.$element, o = this.options; this.fixTitle(); var title, o = this.options; if (typeof o.title == 'string') { title = $e.attr(o.title == 'title' ? 'original-title' : o.title); } else if (typeof o.title == 'function') { title = o.title.call($e[0]); } title = ('' + title).replace(/(^\s*|\s*$)/, ""); return title || o.fallback; }, tip: function() { if (!this.$tip) { this.$tip = $('
').html('
'); this.$tip.data('tipsy-pointee', this.$element[0]); } return this.$tip; }, validate: function() { if (!this.$element[0].parentNode) { this.hide(); this.$element = null; this.options = null; } }, enable: function() { this.enabled = true; }, disable: function() { this.enabled = false; }, toggleEnabled: function() { this.enabled = !this.enabled; } }; $.fn.tipsy = function(options) { if (options === true) { return this.data('tipsy'); } else if (typeof options == 'string') { var tipsy = this.data('tipsy'); if (tipsy) tipsy[options](); return this; } options = $.extend({}, $.fn.tipsy.defaults, options); function get(ele) { var tipsy = $.data(ele, 'tipsy'); if (!tipsy) { tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options)); $.data(ele, 'tipsy', tipsy); } return tipsy; } function enter() { var tipsy = get(this); tipsy.hoverState = 'in'; if (options.delayIn == 0) { tipsy.show(); } else { tipsy.fixTitle(); setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn); } }; function leave() { var tipsy = get(this); tipsy.hoverState = 'out'; if (options.delayOut == 0) { tipsy.hide(); } else { setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut); } }; if (!options.live) this.each(function() { get(this); }); if (options.trigger != 'manual') { var binder = options.live ? 'live' : 'bind', eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; this[binder](eventIn, enter)[binder](eventOut, leave); } return this; }; $.fn.tipsy.defaults = { className: null, delayIn: 0, delayOut: 0, fade: false, fallback: '', gravity: 'n', html: false, live: false, offset: 0, opacity: 0.8, title: 'title', trigger: 'hover' }; $.fn.tipsy.revalidate = function() { $('.tipsy').each(function() { var pointee = $.data(this, 'tipsy-pointee'); if (!pointee || !isElementInDOM(pointee)) { $(this).remove(); } }); }; // Overwrite this method to provide options on a per-element basis. // For example, you could store the gravity in a 'tipsy-gravity' attribute: // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); // (remember - do not modify 'options' in place!) $.fn.tipsy.elementOptions = function(ele, options) { return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; }; $.fn.tipsy.autoNS = function() { return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; }; $.fn.tipsy.autoWE = function() { return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; }; /** * yields a closure of the supplied parameters, producing a function that takes * no arguments and is suitable for use as an autogravity function like so: * * @param margin (int) - distance from the viewable region edge that an * element should be before setting its tooltip's gravity to be away * from that edge. * @param prefer (string, e.g. 'n', 'sw', 'w') - the direction to prefer * if there are no viewable region edges effecting the tooltip's * gravity. It will try to vary from this minimally, for example, * if 'sw' is preferred and an element is near the right viewable * region edge, but not the top edge, it will set the gravity for * that element's tooltip to be 'se', preserving the southern * component. */ $.fn.tipsy.autoBounds = function(margin, prefer) { return function() { var dir = {ns: prefer[0], ew: (prefer.length > 1 ? prefer[1] : false)}, boundTop = $(document).scrollTop() + margin, boundLeft = $(document).scrollLeft() + margin, $this = $(this); if ($this.offset().top < boundTop) dir.ns = 'n'; if ($this.offset().left < boundLeft) dir.ew = 'w'; if ($(window).width() + $(document).scrollLeft() - $this.offset().left < margin) dir.ew = 'e'; if ($(window).height() + $(document).scrollTop() - $this.offset().top < margin) dir.ns = 's'; return dir.ns + (dir.ew ? dir.ew : ''); } }; })(jQuery); // source --> https://4dresult2u.com/wp-content/plugins/wp-shortcode/js/wp-shortcode.js?ver=4.7.28 jQuery(document).ready(function($){ // Toggles if ($('.wp_shortcodes_toggle').length) { $(".togglec").hide(); $(".wps_togglet").click(function(){ $(this).toggleClass("toggleta").next(".togglec").slideToggle("normal"); }); } // Tabs if ($('.wp_shortcodes_tabs').length) { $('.wp_shortcodes_tabs').each(function() { var $this = $(this); $this.find('.tab_content').slice(1).hide(); $this.find('ul.wps_tabs li:first').addClass('active'); $this.find('ul.wps_tabs li a').click(function(e) { e.preventDefault(); var $this_a = $(this); var $tab = $this.find('#'+$this_a.data('tab')); if (! $tab.is(':visible')) { $this.find('.tab_content').hide(); $this_a.parent().addClass('active').siblings().removeClass('active'); $tab.fadeIn(600); } }); }); } if ($('.wp_shortcodes_tooltip').length) { $('.wp_shortcodes_tooltip').each(function(index, el) { var $this = $(this), ttgravity = $this.data('gravity'), ttfade = Boolean($this.data('fade')); $this.tipsy({gravity: ttgravity, fade: ttfade}); }); } });